package cn.yitun.chat.yitunservercommonlib.converter.dto2po.group;

import cn.yitun.chat.yitunservercommonlib.dataentity.dto.group.GroupMemberDto;
import cn.yitun.chat.yitunservercommonlib.dataentity.po.group.GroupMemberInfo;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 群组分类
 */
@Mapper(componentModel = "spring")
public interface GroupMemberDto2PoConverter {
    GroupMemberDto2PoConverter INSTANCE = Mappers.getMapper(GroupMemberDto2PoConverter.class);

    GroupMemberDto do2dto(GroupMemberInfo info);

    List<GroupMemberDto> do2dto(List<GroupMemberInfo> doList);

    @InheritInverseConfiguration
    GroupMemberInfo dto2do(GroupMemberDto dto);
    @InheritInverseConfiguration
    List<GroupMemberInfo> dto2do(List<GroupMemberDto> dtoList);
}
